﻿<UserControl x:Class="Wallace.IDE.SalesForce.UI.VisualForceEditorControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"       
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <avalonEdit:TextEditor x:Name="textEditor"
                               Grid.Row="0"
                               FontFamily="Consolas"
                               FontSize="10pt"
                               HorizontalScrollBarVisibility="Auto"
                               VerticalScrollBarVisibility="Visible"
                               ShowLineNumbers="True" 
                               TextChanged="textEditor_TextChanged"
                               UseLayoutRounding="True">
            <avalonEdit:TextEditor.Options>
                <avalonEdit:TextEditorOptions EnableHyperlinks="False" 
                                              EnableEmailHyperlinks="False"
                                              AllowScrollBelowDocument="True"/>
            </avalonEdit:TextEditor.Options>
        </avalonEdit:TextEditor>

        <ScrollViewer x:Name="scrollViewerErrors"
                      Grid.Row="1"
                      MinHeight="75"
                      MaxHeight="75">
            <ListBox x:Name="listBoxErrors" />
        </ScrollViewer>

        <Button x:Name="buttonCloseErrors"
                Grid.Row="2"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,2,21,0"
                Padding="0"
                BorderThickness="0"
                Click="buttonCloseErrors_Click">
            <Image Height="16" 
                   Width="16" 
                   Margin="0"
                   Source="/Resources/CloseAlt.png"/>
        </Button>
        
    </Grid>
</UserControl>
